home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 July
/
Macworld (1999-07).dmg
/
Shareware World
/
Info
/
For Developers
/
Mops 3.4.sea
/
Mops source
/
Asm Source
/
loadAcodes
< prev
next >
Wrap
Text File
|
1994-05-08
|
2KB
|
81 lines
\ Asm Codes Loader Reese Warner 3/85
\ 9/11/85 RW Added type26
32 hashDic CODES $ 1F setMask: codes 8000 allot: codes
type1 TEMPOBJ \ The class will be changed as necessary
: BUILDCODES { \ bytecode type objaddr ct -- }
0 -> ct
(Frefill) drop
BEGIN
Mword count put: token \ gets opcode name
binary intrp1 -> bytecode \ gets bits for opcode
decimal intrp1 -> type \ gets type of operation
\ bytecode .h space type .h space print: token cr \ debugging
type
SELECT{
1 is{ ['] type1 }end
2 is{ ['] type2 }end
3 is{ ['] type3 }end
4 is{ ['] type4 }end
5 is{ ['] type5 }end
6 is{ ['] type6 }end
7 is{ ['] type7 }end
8 is{ ['] type8 }end
9 is{ ['] type9 }end
10 is{ ['] type10 }end
11 is{ ['] type11 }end
12 is{ ['] type12 }end
13 is{ ['] type13 }end
14 is{ ['] type14 }end
15 is{ ['] type15 }end
16 is{ ['] type16 }end
18 is{ ['] type18 }end
19 is{ ['] type19 }end
20 is{ ['] type20 }end
21 is{ ['] type21 }end
22 is{ ['] type22 }end
23 is{ ['] type23 }end
24 is{ ['] type24 }end
26 is{ ['] type26 }end
27 is{ ['] type27 }end
28 is{ ['] type28 }end
29 is{ ['] type29 }end
30 is{ ['] FPmonadic }end
31 is{ ['] FPdyadic }end
32 is{ ['] FMOVE }end
33 is{ ['] FMOVEM }end
34 is{ ['] FBcc }end
35 is{ ['] FDBcc }end
36 is{ ['] FScc }end
37 is{ ['] FTRAPcc }end
38 is{ ['] FMOVECR }end
39 is{ ['] FNOP }end
40 is{ ['] FSINCOS
DEFAULT=> abort
]SELECT
tempObj set_object_class
bytecode init: tempObj \ reads rest of input line
tempObj token enter: codes
0= abort" hash collision reading asm codes!!"
(Frefill)
NUNTIL ;
: LOADCODES { addr len \ svQuery -- }
cr ." Loading asm codes"
pushNew: loadfile
addr len name: topFile 0 setVref: topFile
openReadOnly: topFile \ open "operands"
IF 200 asmError THEN
buildCodes
drop: loadfile
pos: codes strt: codes -
cr ." Size of codes dictionary: " . ;